/**
 * Copyright (c) 快宝网络 kuaidihelp.com Co., Ltd. All Rights Reserved 禁止外泄以及用于其它的商业用途
 */

import request from '@/utils/request';

// https://eolinker.kuaidihelp.com/#/home/project/inside/api/list?groupID=1270&childGroupID=1292&projectName=%E6%8A%80%E6%9C%AF%E4%BA%BA%E5%91%98%E6%96%87%E6%A1%A3&projectID=98

//同步微信用户列表
export async function getUserListAsync() {
  return request('/Front/sync', {
    method: 'POST',
  });
}

//获取用户信息
export async function getUserInfo(params: any): Promise<any> {
  return request('/Front/getUserInfo', {
    method: 'POST',
    data: params,
  });
}

//获取管理员信息
export async function getManager(params: any): Promise<any> {
  return request('/Front/getManager', {
    method: 'POST',
    data: params,
  });
}

//更新多个成员权限
export async function authorize(params: any): Promise<any> {
  return request('/Front/authorize', {
    method: 'POST',
    data: params,
  });
}

//获取部门列表
export async function getDepartments(params: any): Promise<any> {
  return request('/Front/getAllDepartment', {
    method: 'POST',
    data: params,
  });
}

//获取用户管理员列表
export async function getAllUsers(params: any): Promise<any> {
  return request('/Front/getAllUsers', {
    method: 'POST',
    data: params,
  });
}

//更新单人权限
export async function updateUserAuthorize(params: any): Promise<any> {
  return request('/Front/updateUserAuthorize', {
    method: 'POST',
    data: params,
  });
}

//获取当前用户信息
export async function getInfo(): Promise<any> {
  return request('/Front/getInfo', {
    method: 'POST',
  });
}
